package com.konsung.ksdc.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2016/5/11 0011.
 * 地址信息bean类
 */
public class AddrInfoBean implements Parcelable {
    private String userName; //收件人姓名

    private String phone; //收件人联系电话

    private String memberId; //购买者id

    private String provinceCode; //省级编码
    private String provinceName; //省级名称
    private String cityCode; //市级编码
    private String cityName; //市级名称
    private String townCode; // 县级编码
    private String townName; //县级名称

    private String surplusAddress; //剩余地址

    private String detailAddress; //详细地址

    private String postalCode; //邮编

    private String isTactly; //是否默认地址,Y:是，N：否

    /**
     * 收件人姓名
     * @return 收件人姓名
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 设置收件人姓名
     * @param userName 收件人姓名
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 收件人联系电话
     * @return 收件人联系电话
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 收件人联系电话
     * @param phone 收件人联系电话
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 购买者id
     * @return 购买者id
     */
    public String getMemberId() {
        return memberId;
    }

    /**
     * 购买者id
     * @param memberId 购买者id
     */
    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    /**
     * @return 省级编码
     */
    public String getProvinceCode() {
        return provinceCode;
    }

    /**
     * @param provinceCode 省级编码
     */
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    /**
     * @return 省级名称
     */
    public String getProvinceName() {
        return provinceName;
    }

    /**
     * @param provinceName 省级名称
     */
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    /**
     * @return 市级编码
     */
    public String getCityCode() {
        return cityCode;
    }

    /**
     * @param cityCode 市级编码
     */
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    /**
     * @return 市级名称
     */
    public String getCityName() {
        return cityName;
    }

    /**
     * @param cityName 市级名称
     */
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    /**
     * @return 城镇编码
     */
    public String getTownCode() {
        return townCode;
    }

    /**
     * @param townCode 城镇编码
     */
    public void setTownCode(String townCode) {
        this.townCode = townCode;
    }

    /**
     * @return 城镇名称
     */
    public String getTownName() {
        return townName;
    }

    /**
     * @param townName 城镇名称
     */
    public void setTownName(String townName) {
        this.townName = townName;
    }

    /**
     * @return 剩余地址
     */
    public String getSurplusAddress() {
        return surplusAddress;
    }

    /**
     * @param surplusAddress 剩余地址
     */
    public void setSurplusAddress(String surplusAddress) {
        this.surplusAddress = surplusAddress;
    }

    /**
     * @return 详细地址
     */
    public String getDetailAddress() {
        return detailAddress;
    }

    /**
     * @param detailAddress 详细地址
     */
    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    /**
     * @return 邮政编码
     */
    public String getPostalCode() {
        return postalCode;
    }

    /**
     * @param postalCode 邮政编码
     */
    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    /**
     * @return 默认地址
     */
    public String getIsTactly() {
        return isTactly;
    }

    /**
     * @param isTactly 默认地址
     */
    public void setIsTactly(String isTactly) {
        this.isTactly = isTactly;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userName);
        dest.writeString(this.phone);
        dest.writeString(this.memberId);
        dest.writeString(this.provinceCode);
        dest.writeString(this.provinceName);
        dest.writeString(this.cityCode);
        dest.writeString(this.cityName);
        dest.writeString(this.townCode);
        dest.writeString(this.townName);
        dest.writeString(this.surplusAddress);
        dest.writeString(this.detailAddress);
        dest.writeString(this.postalCode);
        dest.writeString(this.isTactly);
    }

    /**
     * 序列化构造
     * @param in 序列化
     */
    protected AddrInfoBean(Parcel in) {
        this.userName = in.readString();
        this.phone = in.readString();
        this.memberId = in.readString();
        this.provinceCode = in.readString();
        this.provinceName = in.readString();
        this.cityCode = in.readString();
        this.cityName = in.readString();
        this.townCode = in.readString();
        this.townName = in.readString();
        this.surplusAddress = in.readString();
        this.detailAddress = in.readString();
        this.postalCode = in.readString();
        this.isTactly = in.readString();
    }

    public static final Creator<AddrInfoBean> CREATOR = new Creator<AddrInfoBean>() {
        @Override
        public AddrInfoBean createFromParcel(Parcel source) {
            return new AddrInfoBean(source);
        }

        @Override
        public AddrInfoBean[] newArray(int size) {
            return new AddrInfoBean[size];
        }
    };

    @Override
    public String toString() {
        return "AddrInfoBean{" +
                "userName='" + userName + '\'' +
                ", phone='" + phone + '\'' +
                ", memberId='" + memberId + '\'' +
                ", provinceCode='" + provinceCode + '\'' +
                ", provinceName='" + provinceName + '\'' +
                ", cityCode='" + cityCode + '\'' +
                ", cityName='" + cityName + '\'' +
                ", townCode='" + townCode + '\'' +
                ", townName='" + townName + '\'' +
                ", surplusAddress='" + surplusAddress + '\'' +
                ", detailAddress='" + detailAddress + '\'' +
                ", postalCode='" + postalCode + '\'' +
                ", isTactly='" + isTactly + '\'' +
                '}';
    }
}
